from bs4 import BeautifulSoup
import requests

# 加载HTML文件
with open('your_local_html_file.html', 'r') as f:
    html_content = f.read()

# 创建BeautifulSoup对象
soup = BeautifulSoup(html_content, 'html.parser')

# 查找特定标签（如：标题）并提取内容
title_tag = soup.find('h1')
if title_tag:
    title_text = title_tag.text
    print(f"Title: {title_text}")

# 可能还需要查找其他元素，比如链接
links = soup.find_all('a')
for link in links:
    href = link.get('href')
    print(f"Link: {href}")